import { Promise } from 'core-js';
import { defineStore } from 'pinia'
export const userInfo = defineStore('user', {
    state: () => {
        return {
            user: null,
        }
    },
    actions: {
        getUset(value){
            console.log(value,9994456456);
            this.user=value
         
        }
    },
    persist: {
        enabled: true,   // 表示启用数据持久化
        strategies: [
            // isCollapsed字段用 localstorage存储
            {
                storage: localStorage,
                key: "userInfo",
            },

        ]
    }

})

